import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { DefaultComponent } from '@layout/default/default.component';

const routes: Routes = [
  {
    path: '',
    component: DefaultComponent,
    children: [
      {
        path: 'home',
        loadChildren: () => import('./home/home.module').then(mod => mod.HomeModule),
        data: { breadcrumb: '首页' }
      },
      {
        path: 'user',
        loadChildren: () => import('./user/user.module').then(mod => mod.UserModule),
        data: { breadcrumb: '用户' }
      },
      {
        path: 'permission',
        loadChildren: () => import('./permission/permission.module').then(mod => mod.PermissionModule),
        data: { breadcrumb: '权限' }
      },
    ]
  },
  {
    path: 'murderer',
    loadChildren: () => import('./murderer/murderer.module').then(mod => mod.MurdererModule),
    data: { breadcrumb: '凶手' }
  },
  {
    path: 'screen',
    loadChildren: () => import('./screen/screen.module').then(mod => mod.ScreenModule),
    data: { breadcrumb: '大屏' }
  },
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class RoutesRoutingModule { }
